#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "playerform.h"
#include "handout.h"
#include <QPainter>
#include <QString>
#include <QObject>
#include <QImage>
#include <QVector>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    Handout *N;
    void gameloop();
    void myturn();
    int total=0;
    int current=1;
    int mycoin=20;
    bool ismylooked=false;
    bool ismyalive=true;
    int type=-1;
    int capital[2]={0};
    int sub=0;
    int subsub=0;
    int onescard[3]={0};
    void myjudge();
    void sectionover(int);
    void gameover(int);
    void turnover(int);
    bool bating(PlayerForm*,PlayerForm*);
    bool battled(PlayerForm*);
public slots:
    void Starter();
    void mylooked();
    void myonced();
    void mytwiced();
    void mytrebled();
    void mygived();
    void myshowhanded();
    void mypassed();
    void beginbattle1();
    void beginbattle2();
    void beginbattle3();
    void beginbattle4();
    void beginbattle5();
    void turn1();
    bool mybating(PlayerForm*);
private:
    Ui::Widget *ui;
    void paintEvent(QPaintEvent*);

};
#endif // WIDGET_H
